Skip to main content

Json 模块

GrowingIO SDK 数据模块默认使用 Google Protobuf 格式保存和上传事件数据。如需要使用Json格式保存和上传事件数据,需要集成本模块。

caution

使用 Protobuf 格式保存和上传事件数据兼容 json 格式,但是迁移会导致APP本地数据库内未上传的事件数据丢失,后续产生的新数据则不受影响。


SDK说明

关键词是否集成输入数据类输出数据类最低SDK版本
json手动集成EventFormatDataEventByteArray-

依赖方式

dependencies {
implementation 'com.growingio.android:json:4.3.0'
}

使用方式

GrowingAutotracker.startWithConfiguration(this,
new AutotrackConfiguration("accountId", "urlScheme")
//...
.addPreloadComponent(new JsonLibraryModule()));